<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page import="dto.LoggedUser"%>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <title>login</title>
        <link href="css.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="JavaSCript/Javascripts.js"></script>
    </head>
    <body>
        <div class="sidebar_box">
            <table width="224" border="0" align="center" cellpadding="4" cellspacing="0">
                <tr>
                    <td>
                        <div style="padding-bottom: 8px;">
                            <form name="loginfrm" method="post" action="./Login"
                                  style="margin: -10px;" onsubmit="return login_frm()">
                                <table width="215" border="0" align="center">
                                    <%
                                                LoggedUser loggedUser = (LoggedUser)session.getAttribute("user");
                                                if (loggedUser != null) {
                                    %>
                                    <tr>
                                        <td colspan=2><span>Welcome
                                                <%=loggedUser.getFullname()%>, you have successfully
										logged in the portal.</span></td>
                                    </tr>
                                    <tr>
                                        <td><input type="submit" value="Sign Out" onclick="return logoff_frm()"/></td>
                                    </tr>
                                    <%
                                    } else {
                                    %>
                                    <tr>
                                        <td colspan="2">Enter Username and Password:</td>
                                    </tr>
                                    <tr>
                                        <td>Username:</td>
                                        <td>
                                            <input type="text" name="username"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>Password:</td>
                                        <td><input type="password" name="password"/>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td><input type="submit" value="Sign In" alt="Sign In" /></td>
                                        <td><input type="reset" alt="Clear" /></td>
                                    </tr>
                                    <%}%>
                                </table>
                            </form>
                        </div>
                    </td>
                </tr>
            </table>
            <div class="cleaner"></div>
        </div>
        <div class="sidebar_box_bottom"></div>
    </body>
</html>